public class Degrees
{
   /**
      Converts the specified decimal degrees to a string with degrees, minutes, seconds.
      @param decimalDegrees a decimal degree value >= 0, such as 40.25833
      @return a string with the degrees, minutes, and seconds, such as 40°15'30" 
   */
   public String convert(double decimalDegrees)
   {   
      String degSymbol = "\u00B0";
      int degrees,minutes,seconds;
      degrees =(int)(decimalDegrees);
      minutes = (int)((decimalDegrees - degrees)*60.0); 
      seconds = (int)Math.ceil(((decimalDegrees - degrees)*60.0-minutes)*60.0);
      String convert = String.valueOf(degrees)+degSymbol  +
      String.valueOf(minutes) + "'" + String.valueOf(seconds) + "\"";
      return convert;
      
   }
   
}